﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace MySilverlightAlbum
{
    public class ToolbarMenuItem : Button
    {
        #region Dependency Properties 

        public static DependencyProperty TitleProperty = DependencyProperty.Register(
            "Title", typeof(string), typeof(ToolbarMenuItem), new PropertyMetadata(String.Empty));

        public static DependencyProperty MoreMarkProperty = DependencyProperty.Register(
            "MoreMark", typeof(string), typeof(ToolbarMenuItem), new PropertyMetadata(String.Empty));

        public static DependencyProperty SeparatorProperty = DependencyProperty.Register(
            "Separator", typeof(Thickness), typeof(ToolbarMenuItem), new PropertyMetadata(
                new Thickness(0,0, 1, 0)));

        public static DependencyProperty DescriptionProperty = DependencyProperty.Register(
            "Description", typeof(string), typeof(ToolbarMenuItem), new PropertyMetadata(String.Empty));

        #endregion

        public ToolbarMenuItem(
        )
        {
            this.DefaultStyleKey = typeof(ToolbarMenuItem);
        }

        public string Title
        {
            get
            {
                return (string) GetValue(TitleProperty);
            }
            set
            {
                SetValue(TitleProperty, value);
            }
        }

        public string MoreMark
        {
            get
            {
                return (string) GetValue(MoreMarkProperty);
            }
            set
            {
                SetValue(MoreMarkProperty, value);
            }
        }

        public Thickness Separator
        {
            get
            {
                return (Thickness) GetValue(SeparatorProperty);
            }
            set
            {
                SetValue(SeparatorProperty, value);
            }
        }

        public string Description
        {
            get
            {
                return (string) GetValue(DescriptionProperty);
            }
            set
            {
                SetValue(DescriptionProperty, value);
            }
        }
    }
}
